class Animal {
    public int age;
    public String name;
    public void eat() {
        System.out.println("正在吃东西");
    }
}
class Cat extends Animal {

    @Override
    public void eat() {
        System.out.println("正在吃猫粮");
    }
}
public class Test {
    public static void main(String[] args) {
        Animal animal = new Cat();
        animal.eat();
    }
}
